<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>还款页面</title>
<meta name="decorator" content="default" />
<style>
</style>
<script type="text/javascript">
$().ready(function(){
disableExitMenu();
});
</script>
</head>
<body>
	<tags:message content="${message}" />
	<div class="container">
	  <div  class="icon-buttons">
		<a href="${ctx}/cash/member/detail?id=${member.customer.id}"
		 data-role="button" data-inline="true" data-icon="back" data-iconpos="notext">返回</a>
		</div>
		<form action="${ctx}/cash/member/repayment/repaydebt" method="post">
			<input type="hidden" name="memeberID" value="${member.customer.id}" />
			<div data-role="fieldcontain">
				<label>当前应还欠款 :</label> <input type="text" readonly
					name="refundDebt" value="${member.requiredRefundDebt}" />
			</div>
			<div style="text-align: center;">
			<input type="submit" data-inline="true" value="确认还款" />
			</div>
		</form>
		<table id="contentTable" data-role="table" class="ui-responsive table-stroke">
			<thead>
				<tr>
					<th colspan="5">欠款还款记录</th>
				</tr>
				<tr>
					<th>时间</th>
					<th>交易类型</th>
					<th>交易金额</th>
					<th>交易后欠款</th>
					<th>备注</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${member.storeConsumeDebts}" var="debt">
					<c:if test="${debt.refundConsume!=null}">
						<tr>
							<td>${fns:formatDate(debt.refundConsume.consume_Time,
								"yyyy-MM-dd HH:mm:ss")}</td>
							<td>还款</td>
							<td>${debt.debtMoney}</td>
							<td>0</td>
							<td>交易流水号：${debt.refundConsume.consume_Number}<br /> 还欠款
							</td>
						</tr>
					</c:if>
					<tr>
						<td>${fns:formatDate(debt.debtConsume.consume_Time,
							"yyyy-MM-dd HH:mm:ss")}</td>
						<td>店面欠款</td>
						<td>${debt.debtConsume.money_To_Pay}</td>
						<td>${debt.debtMoney}</td>
						<td>交易流水号：${debt.debtConsume.consume_Number}<br />
							应付金额：${debt.debtConsume.money_To_Pay}<br /> 实付金额
							：${debt.debtConsume.money_To_Pay-debt.debtMoney}<br />
						</td>
					</tr>
				</c:forEach>


			</tbody>
		</table>
		<div class="pagination">${page}</div>

	</div>

</body>
</html>
